package com.ky.toutiao;

import java.util.HashMap;
import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.joke.auto.FetchHot;

public class fetchTodayTT {
	
	private static final Logger logger = LoggerFactory.getLogger(FetchHot.class);

	private static String toutiao = "https://pangolin.bytedance.com/api/activation/list";
	private static String ttCookie = "connect.sid=s%3AWz1Hfsn_iwfmG2qeodatuTxJ533dDYaG.nz9wnOUuD8%2BDXX9LZPrRXL3lInL4xkIX5vLcJReq%2BzI";

	public static void main(String[] args) {
		
	}
	
	private Map<String, String> baisiHot(Map<String, String> hotMap) {
		for (int i = 1; i < 2; i++) {
			String contentHTML = getContent(toutiao,ttCookie,i);
		}
		return hotMap;
	}

	private String getContent(String url,String cookie, int i) {
		HttpClientGet httpClientGet = HttpClientGet.getInstance();
		httpClientGet.createDefaultHttpClient();
		Map<String, String> header = new HashMap<>();
		header.put("Cookie",cookie);
		httpClientGet.setHeader(header);
		if(i==0) return null;
		else if(i>0) url = url.replace("(*)", String.valueOf(i));
		String contentHTML = httpClientGet.sendHttpGet(url);
		return contentHTML;
	}
	
	private String get(String url, String cookie) {
		String contentHTML = "";
		
		
		return contentHTML;
	}
	
}
